package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.Menu;
import com.itheima.pojo.Role;
import com.itheima.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface UserDao {
    public User findByUsername(String username);


    void add(User user);

    void setUserAndRole(Map map);

    Page selectByCondition(String queryString);

    public User findById(Integer id);
    public List<Integer> findRoleIdsByUserId(Integer id);
    public void edit(User user);
    public void deleteAssocication(Integer id);

    List<User> findAll();

    List<User> listBySetmealId(int setmealId);

    long findUserCountByRole(Integer id);

    void deleteById(Integer id);

    User findByUsernameAndTel(@Param("username") String username,@Param("telephone") String telephone);

    void editPassword(@Param("username") String username,@Param("password") String password);
}
